<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:o="http://openfaces.org/" lang="en">
	
	<ui:decorate template="/WEB-INF/facelets/faceletEditar.xhtml">
		<ui:define name="form">
			<h:form styleClass="form-horizontal">
				<fieldset>
					<legend>Formulário de Cadastro de Usuários</legend>
					<div class="control-group">
						<h:outputLabel id="Nome" value="Nome:" for="Nome"
							styleClass="control-label" />
						<h:inputText value="#{UsuarioMB.entidade.nome}" styleClass="span3" />
						<br />
						<h:outputLabel id="Usuário" value="Usuário:" for="Usuário"
							styleClass="control-label" />
						<h:inputText value="#{UsuarioMB.entidade.usuario}"
							styleClass="span3" />
						<br />
						<h:outputLabel id="Senha" value="Senha:" for="Senha"
							styleClass="control-label" rendered="#{UsuarioMB.exibirSenha}" />
						<h:inputSecret value="#{UsuarioMB.entidade.senha}"
							styleClass="span3" rendered="#{UsuarioMB.exibirSenha}" />
						<br />
						<div class="controls">
							<h:commandButton value="Gravar" action="#{UsuarioMB.gravar}"
								styleClass="btn btn-inverse btn-large" />
							<span></span>
							<o:commandButton value="Excluir" action="#{UsuarioMB.excluir}"
								styleClass="btn btn-inverse btn-large"
								rendered="#{UsuarioMB.exibirExcluir}">
								<o:confirmation event="click" message="Confirma exclusão?"
									cancelButtonText="Cancelar" okButtonText="Confirmar"
									caption="Confirmação"
									details="Clique em 'Confirmar' para excluir">
								</o:confirmation>
							</o:commandButton>
						</div>
					</div>
				</fieldset>
			</h:form>
		</ui:define>
	</ui:decorate>
</html>